package org.msn.gui.init;

import javafx.collections.ObservableList;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.ListView;
import javafx.scene.input.MouseEvent;
import javafx.stage.Stage;
import org.msn.gui.constant.APIConstant;

import java.net.URL;
import java.util.ResourceBundle;

public class ShowAllRoomInit extends ParentInit {
    @FXML
    private ListView<String> rooms;

    public static ObservableList<String> exportRooms;

    public static String exportSelectRoomName;

    public static Stage exportAddRoomStage;

    @Override
    public void initialize(URL url, ResourceBundle resourceBundle) {
        exportRooms = rooms.getItems();

        rooms.setOnMouseClicked(mouseEvent -> exportSelectRoomName = rooms.getSelectionModel().getSelectedItem());
    }
}
